<!doctype html>
<html lang="zh-CN">
<head>
@include('books.partials.bookallheader')
</head>
<body class="docs">
@include('books.partials.navtop')
@include('books.partials.nav')

<div class="docs-wrapper container">

    <article>
        <div class="tags">
            <h1>夜读书所有书籍</h1>
        </div>
        <div class="mod book-list">
        @foreach ($books as $book)
        <dl>
        <dt>
            <a href="{{ URL::action('BookController@show',['id'=>$book->book_id])}}" target="_blank">
            <img src="{{ asset($book->bimg) }}">
            </a>
        </dt>
        <dd>
            <a href="{{ URL::action('BookController@show',['id'=>$book->book_id])}}" class="title" target="_blank">{{ $book->book_name }}</a>
            <div class="desc">
            @if($book->zuozhe!=""){{ $book->zuozhe }} /@endif 
            @if($book->yizhe!=""){{ $book->yizhe }} / @endif 
            @if($book->chubanshe!=""){{ $book->chubanshe }} /@endif 
            @if($book->chubannian!=""){{ $book->chubannian }} /@endif
            @if($book->dingjia!=""){{ $book->dingjia }}元@endif
            </div>
            <div class="rating">
            <span class="allstar"></span>
            <span class="rating_nums">@if($book->click_count!="")阅读：{{ $book->click_count }}@endif</span>
            </div>
        </dd>
        </dl>
        @endforeach
        </div>
        {!! $books->render() !!}

    </article>

    <section class="sidebar">
        <div class="fenlei">
            <h2>书籍分类</h2>
            <ul class="unstyled">
            @foreach($fenleis as $fenlei)
                <li><a href="{{asset($fenlei->cat_id)}}/catid"> {{$fenlei->cat_name}} </a></li>
            @endforeach
            </ul>
        </div>
    </section>

</div>

@include('books.partials.footer')

</body>
</html>
